﻿@model IEnumerable<DistanceLearning.Models.ExamConcreteTest>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_mainLayout.cshtml";
}

<h2>Результаты пользователя 
@{ 
    string results = "";
    if (Model != null && Model.Count() > 0)
    {
        results = Model.First().UserDetails.FirstName; 
    }
} @results</h2>

<table>
    <tr>
        <th>Предмет</th>
        <th>Название теста</th>
        <th>Результат</th>
        <th>Время окончания</th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ExamTest.Subject.SubjectName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExamTest.TestName)
        </td>
        <td>
            @*@Html.Display(string.Format("{0:f2}", item.Result))*@
            @Html.Label("TextResultLabel", string.Format("{0:f2}%", item.Result*100))
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EndTime)
        </td>

        @*<td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>*@
    </tr>
}

</table>
